package com.mspbots.teams.controller;

import com.mspbots.teams.model.EscalationDTO;
import com.mspbots.teams.service.EscalationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.Callable;

@Slf4j
@RestController
@RequestMapping("escalation")
public class EscalationController {

    @Autowired
    private EscalationService escalationService;

    @PostMapping("check")
    public Callable check(@RequestBody EscalationDTO escalationDTO) {
        return () -> escalationService.check(escalationDTO);
    }


}
